﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace _20_Path
{
    //专门操作路径的， 类似QFileInfo
    class Program
    {
        static void Main(string[] args)
        {
            string str = @"E:\TestCode\CS_Learn\07-Enum\program.cs";
            // 获得文件名
            Console.WriteLine(Path.GetFileName(str));
            Console.WriteLine(Path.GetFileNameWithoutExtension(str));
            Console.WriteLine(Path.GetPathRoot(str));

            Console.ReadKey();
        }
    }
}
